
<g:if test="${shipLot.size() > 0}">

    <meta charset="utf-8">
    <style type="text/css">
    th{
        width: 9em;
    }
    tr,td{
        border: 1px #ADBFCD solid;
    }
    .odd{
        background-color: #EBEBEB;
    }
    .xl70
    {mso-style-parent:style0;
        mso-number-format:"yyyy/m/d\\ h:mm:ss";
        white-space:normal;
        font-size:10.0pt;
        font-family:Arial Unicode MS;
        mso-font-charset:134;
        border:1.0pt solid #ADBFCD;}
</style>

    <table class="table table-bordered table-hover table-striped table-top" data-toggle="tablefixed" data-width="100%" data-nowrap="true">
        <thead>
        <tr>
            <th align="center" width="60">NO.</th>
            <th align="center" width="60">封装厂名</th>
            <th align="center" width="120">箱号</th>
            <th align="center" width="150">产品名称</th>
            <th align="center" width="80">封装形式</th>
            <th align="center" width="100">标签批号</th>
            <th align="center" width="100">扩散批号</th>
            <th align="center" width="60">档位</th>
            <th align="center" width="100">周记</th>
            <th align="center" width="100">入库数量(PCS)</th>
            <th align="center" width="150">客户名称</th>
            <th align="center" width="290">收货地址</th>
            <th align="center" width="160">入库日期</th>
            <th align="center" width="150">客户订单号</th>
        </tr>
        </thead>
        <tbody>
        <g:each in="${shipLot}" status="i" var="tableInstance">
            <tr>
                <td align="center" width="60">${i+1}</td>
                <td align="center" width="60">${tableInstance.SITE_NAME}</td>
                <td align="center" width="120">${tableInstance.LOT_ID}</td>
                <td align="center" width="150">${tableInstance.PART_NAME}</td>
                <td align="center" width="80">${tableInstance.RESERVED1}</td>
                <td align="center" width="100">${tableInstance.RESERVED3}</td>
                <td align="center" width="100">${tableInstance.SUBSTRATE_ID1}</td>
                <td align="center" width="60">${tableInstance.GRADE1}</td>
                <td align="center" width="100">${tableInstance.RESERVED4}</td>
                <td align="center" width="100" name="ageSum${i}">${tableInstance.MAIN_QTY}</td>
                <td align="center" width="150">${tableInstance.SHORT_NAME1}</td>
                <td align="center" width="150">${tableInstance.DESCRIPTION}</td>
                <td align="center" width="160">${tableInstance.UPDATED}</td>
                <td align="center" width="150">${tableInstance.CUSTOMER_ORDER}</td>
            </tr>
        </g:each>
    <g:each in="${shipTotal}" status="i" var="tableInstance1">
        <tr>
            <td colspan="2" align="center">入库数量合计</td>
            <td name="ageShow"colspan="12" align="center"  >${tableInstance1.MAIN_QTY}</td>
        </tr>
    </g:each>
        </tbody>
    </table>
    </div>
</g:if>
<script>
    $(function () {
        var ageResult = 0;   /*定义一个薪资遍历*/
        for (var i = 0; i <${shipLot.size()}; i++) {  /*遍历主demo3函数*/
            var ageAddSum = 'ageSum' + i    /*在上面定义 salarysum行的结果*/
            var ageAdd = $("td[name='" + ageAddSum + "']").text() == '' ? 0 : parseInt($("td[name='" + ageAddSum + "']").text())
            ageResult += ageAdd
        }
        $("td[name='ageShow']").html(ageResult)
    })
</script>